package com.geostar.constructionland.index.factory;

import com.geostar.constructionland.index.entity.RateElement;
import com.geostar.constructionland.index.service.RateCalculate;
import com.geostar.constructionland.index.service.impl.RateSqlCalculate;
import com.geostar.constructionland.index.util.SpringUtils;

/**
 * @author yelll
 * @since 2020-3-16 23:47
 **/
public class RateCalFactory {
    public  static RateCalculate getRateCalByRateEle(RateElement rateElement){
        RateCalculate rateCalculate = null;
        if(rateElement.getSource().equals("sql")){
            rateCalculate = SpringUtils.getObject(RateSqlCalculate.class);
        }
        return rateCalculate;
    }
}
